#ifndef AI_H
#define AI_H

#include <map>
#include "Olive.h"
#include "Spinach.h"
//#include "Brutus.h"
#include "Popeye.h"
#include "TickAnimation.h"
#include "TimerTickAnimator.h"
#include "Timer.h"
#include "AnimatorHolder.h"

class AI {
private:
	typedef void (*TickFunc)(void* closure);
	static std::map<Sprite *, TimerTickAnimator *> timer;
	static Popeye *popeye;
public:
	AI(void);
	~AI(void);
	static void PopeyeDies(void);
	static void Register(Sprite *s, TickFunc f, delay_t delay, int repetitions);
	static void SetFinish(Sprite *s,  Animator::FinishCallback f);
	static void StartAI(void);
	static void StopAnimator(Sprite *);
	static void setPopeye(Popeye *popeye);
	static Rect getPopeyeRect(void);
	static Platform *getPopeyePlatform(void);
	static bool getPopeyeDirection(void);
	static enum popeyeMode getPopeyeMode(void);
	void ProgressMove(void);
};

#endif